﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Fengsoft.Plupload;
namespace Fengsoft.AIBlog.Web
{
    /// <summary>
    /// Plupload - http://www.plupload.com. Using the plUpload Component with ASP.NET Article Code. See detail at https://github.com/RickStrahl/Westwind.plUploadHandler.
    /// </summary>
    public class uploadblobhandler:PluploadFileHandler
    {
        public uploadblobhandler()
        {
            // Normally you'd set these values from config values.
            this.allowedExtensions=".jpg,.jpeg,.png,.gif,.bmp,.xlsx";
            this.FileUploadPhysicalPath="~/app_data/blob";
            this.maxUploadSize=0; // Unlimited
        }
        protected override bool OnUploadStarted(int chunk,int chunks,string fileName)
        {
            return base.OnUploadStarted(chunk,chunks,fileName);
        }
        protected override void OnUploadCompleted(string fileName)
        {
            base.OnUploadCompleted(fileName);
            this.WriteUploadCompletedMessage("Upload file successfully.");
        }
    }
}